import type { GeneratedEtsLibFile } from "../../types/generated";

export const FILE: GeneratedEtsLibFile = {
  path: 'ets/api/@ohos.taskpool.d.ts',
  content: "/*\n * Copyright (c) 2022 Huawei Device Co., Ltd.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file\n * @kit ArkTS\n */\n/**\n * JS cross-thread task executor.\n *\n * @namespace taskpool\n * @syscap SystemCapability.Utils.Lang\n * @since 9\n */\n/**\n * JS cross-thread task executor.\n *\n * @namespace taskpool\n * @syscap SystemCapability.Utils.Lang\n * @crossplatform\n * @since 10\n */\n/**\n * JS cross-thread task executor.\n *\n * @namespace taskpool\n * @syscap SystemCapability.Utils.Lang\n * @crossplatform\n * @atomicservice\n * @since 11\n */\ndeclare namespace taskpool {\n    /**\n     * The Priority defines the task priority.\n     *\n     * @enum { number } Priority\n     * @syscap SystemCapability.Utils.Lang\n     * @since 9\n     */\n    /**\n     * The Priority defines the task priority.\n     *\n     * @enum { number } Priority\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Enumerates the priorities available for created tasks.\n     *\n     * @enum { number } Priority\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    enum Priority {\n        /**\n         * set task priority to high.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @since 9\n         */\n        /**\n         * set task priority to high.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * The task has a high priority.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        HIGH = 0,\n        /**\n         * set task priority to medium.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @since 9\n         */\n        /**\n         * set task priority to medium.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * The task has a medium priority.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        MEDIUM = 1,\n        /**\n         * set task priority to low.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @since 9\n         */\n        /**\n         * set task priority to low.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * The task has a low priority.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        LOW = 2,\n        /**\n         * The task is a background task.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        IDLE = 3\n    }\n    /**\n     * Describes a callback function.\n     *\n     * @typedef { function } CallbackFunction\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    type CallbackFunction = () => void;\n    /**\n     * Describes a callback function with an error message.\n     *\n     * @typedef { function } CallbackFunctionWithError\n     * @param { Error } e - Error message.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    type CallbackFunctionWithError = (e: Error) => void;\n    /**\n     * The Task class provides an interface to create a task.\n     *\n     * @syscap SystemCapability.Utils.Lang\n     * @since 9\n     */\n    /**\n     * The Task class provides an interface to create a task.\n     *\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Implements a task. Before calling any APIs in Task, you must use constructor to create a Task instance.\n     * A task can be executed for multiple times, placed in a task group, serial queue, or asynchronous queue for execution,\n     * or added with dependencies for execution.\n     *\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    class Task {\n        /**\n         * Create a Task instance.\n         *\n         * @param { Function } func - func func Concurrent function to execute in taskpool.\n         * @param { unknown[] } args - args args The concurrent function arguments.\n         * @throws { BusinessError } 401 - The input parameters are invalid.\n         * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n         * @syscap SystemCapability.Utils.Lang\n         * @since 9\n         */\n        /**\n         * Create a Task instance.\n         *\n         * @param { Function } func - func func Concurrent function to execute in taskpool.\n         * @param { unknown[] } args - args args The concurrent function arguments.\n         * @throws { BusinessError } 401 - The input parameters are invalid.\n         * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * A constructor used to create a Task instance.\n         *\n         * @param { Function } func - Function to be executed. The function must be decorated using @Concurrent.\n         *      For details about the supported return value types of the function, see Sequenceable Data Types.\n         * @param { Object[] } args - Arguments of the function. For details about the supported parameter types,\n         *      see Sequenceable Data Types. The default value is undefined.\n         * @throws { BusinessError } 401 - The input parameters are invalid.\n         * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        constructor(func: Function, ...args: Object[]);\n        /**\n         * A constructor used to create a Task instance, with the task name specified.\n         *\n         * @param { string } name - Task name.\n         * @param { Function } func - Function to be executed. The function must be decorated using @Concurrent.\n         *     For details about the supported return value types of the function, see Sequenceable Data Types.\n         * @param { Object[] } args - Arguments of the function. For details about the supported parameter types,\n         *     see Sequenceable Data Types. The default value is undefined.\n         * @throws { BusinessError } 401 - The input parameters are invalid.\n         * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        constructor(name: string, func: Function, ...args: Object[]);\n        /**\n         * Check current running Task is canceled or not.\n         *\n         * @returns { boolean } Returns {@code true} if current running task is canceled; returns {@code false} otherwise.\n         * @static\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Checks whether the running task is canceled. Before using this API, you must create a Task instance.\n         * isCanceled must be used together with taskpool.cancel. If cancel is not called, isCanceled returns false by default.\n         *\n         * @returns { boolean } Returns {@code true} if current running task is canceled; returns {@code false} otherwise.\n         * @static\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        static isCanceled(): boolean;\n        /**\n         * Sends data to the host thread and triggers the registered callback. Before using this API, you must create a Task instance.\n         * NOTE:\n         * 1.The API is called in the TaskPool thread.\n         * 2.Do not use this API in a callback function.\n         * 3.Before calling this API, ensure that the callback function for processing data has been registered in the host thread.\n         *\n         * @param { Object[] } args - Data to be used as the input parameter of the registered callback. For details about\n         *     the supported parameter types, see Sequenceable Data Types. The default value is undefined.\n         * @throws { BusinessError } 401 - The input parameters are invalid.\n         * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n         * @throws { BusinessError } 10200022 - The function is not called in the TaskPool thread.\n         * @throws { BusinessError } 10200023 - The function is not called in the concurrent function.\n         * @throws { BusinessError } 10200024 - The callback is not registered on the host side.\n         * @static\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        static sendData(...args: Object[]): void;\n        /**\n         * Set transfer list for this task.\n         *\n         * @param { ArrayBuffer[] } [transfer] - transfer Transfer list of this task, empty array is default.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Sets the task transfer list. Before using this API, you must create a Task instance. If this API is not called,\n         * the ArrayBuffer in the data is transferred by default.\n         * NOTE:\n         * This API is used to set the task transfer list in the form of ArrayBuffer in the task pool.\n         * The ArrayBuffer instance does not copy the content in the task to the worker thread during transfer.\n         * Instead, it transfers the buffer control right to the worker thread. After the transfer, the ArrayBuffer instance\n         * becomes invalid. An empty ArrayBuffer will not be transferred.\n         *\n         * @param { ArrayBuffer[] } [transfer] - ArrayBuffer instance holding the objects to transfer. The default value is an empty array.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed.\n         * @throws { BusinessError } 10200029 - An ArrayBuffer cannot be set as both a transfer list and a clone list.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        setTransferList(transfer?: ArrayBuffer[]): void;\n        /**\n         * Sets the task clone list. Before using this API, you must create a Task instance.\n         * NOTE:\n         * This API must be used together with the @Sendable decorator. Otherwise, an exception is thrown.\n         *\n         * @param { Object[] | ArrayBuffer[] } cloneList - The type of the passed-in array must be sendable data types or ArrayBuffer.\n         *     All Sendable class instances or ArrayBuffer objects passed in to cloneList are transferred in copy mode between threads.\n         *     This means that any modification to the destination objects does not affect the original objects.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * 1.Mandatory parameters are left unspecified;\n         * 2.Incorrect parameter types;\n         * 3.Parameter verification failed.\n         * @throws { BusinessError } 10200029 - An ArrayBuffer cannot be set as both a transfer list and a clone list.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        setCloneList(cloneList: Object[] | ArrayBuffer[]): void;\n        /**\n         * Registers a callback for a task to receive and process data from the worker thread. Before using this API, you must create a Task instance.\n         * NOTE:\n         * If multiple callbacks are registered for the same task, only the last registration takes effect.\n         *\n         * @param { Function } [callback] - Callback function for processing the data received. The data sent to the host\n         *     thread is transferred to the callback as an input parameter. If no value is passed in, all the registered callbacks are canceled.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        onReceiveData(callback?: Function): void;\n        /**\n         * Add dependencies on the task array for this task.\n         *\n         * @param { Task[] } tasks - tasks tasks An array of dependent tasks.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * 1.Mandatory parameters are left unspecified;\n         * 2.Incorrect parameter types;\n         * 3.Parameter verification failed.\n         * @throws { BusinessError } 10200026 - There is a circular dependency.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Add dependencies on the task array for this task.\n         *\n         * @param { Task[] } tasks - An array of dependent tasks.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 10200026 - There is a circular dependency.\n         * @throws { BusinessError } 10200052 - The periodic task cannot have a dependency.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        /**\n         * Adds dependent tasks for this task. Before using this API, you must create a Task instance.\n         * The task and its dependent tasks cannot be a task in a task group, serial queue, or asynchronous queue,\n         * a task that has been executed, or a periodic task. A task with a dependency relationship (a task that depends\n         * on another task or a task that is depended on) cannot be executed multiple times.\n         *\n         * @param { Task[] } tasks - Array of tasks on which the current task depends. The default value is undefined.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 10200026 - There is a circular dependency.\n         * @throws { BusinessError } 10200052 - The periodic task cannot have a dependency.\n         * @throws { BusinessError } 10200056 - The task has been executed by the AsyncRunner.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 18\n         */\n        addDependency(...tasks: Task[]): void;\n        /**\n         * Remove dependencies on the task array for this task.\n         *\n         * @param { Task[] } tasks - tasks tasks An array of dependent tasks.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * 1.Mandatory parameters are left unspecified;\n         * 2.Incorrect parameter types;\n         * 3.Parameter verification failed.\n         * @throws { BusinessError } 10200027 - The dependency does not exist.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Remove dependencies on the task array for this task.\n         *\n         * @param { Task[] } tasks - An array of dependent tasks.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 10200027 - The dependency does not exist.\n         * @throws { BusinessError } 10200052 - The periodic task cannot have a dependency.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        /**\n         * Removes dependent tasks for this task. Before using this API, you must create a Task instance.\n         *\n         * @param { Task[] } tasks - Array of tasks on which the current task depends. The default value is undefined.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 10200027 - The dependency does not exist.\n         * @throws { BusinessError } 10200052 - The periodic task cannot have a dependency.\n         * @throws { BusinessError } 10200056 - The task has been executed by the AsyncRunner.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 18\n         */\n        removeDependency(...tasks: Task[]): void;\n        /**\n         * Register a callback function and call it when a task is enqueued.\n         * The registration must be carried out before the task is executed. Otherwise, an exception is thrown.\n         *\n         * @param { CallbackFunction } [callback] - Callback function to register.\n         * @throws { BusinessError } 401 - The input parameters are invalid.\n         * @throws { BusinessError } 10200034 - The executed task does not support the registration of listeners.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        onEnqueued(callback: CallbackFunction): void;\n        /**\n         * Register a callback function and call it when the execution of a task starts.\n         * The registration must be carried out before the task is executed. Otherwise, an exception is thrown.\n         *\n         * @param { CallbackFunction } [callback] - Callback function to register.\n         * @throws { BusinessError } 401 - The input parameters are invalid.\n         * @throws { BusinessError } 10200034 - The executed task does not support the registration of listeners.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        onStartExecution(callback: CallbackFunction): void;\n        /**\n         * Register a callback function and call it when a task fails to be executed.\n         * The registration must be carried out before the task is executed. Otherwise, an exception is thrown.\n         *\n         * @param { CallbackFunctionWithError } [callback] - Callback function to register.\n         * @throws { BusinessError } 401 - The input parameters are invalid.\n         * @throws { BusinessError } 10200034 - The executed task does not support the registration of listeners.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        onExecutionFailed(callback: CallbackFunctionWithError): void;\n        /**\n         * Register a callback function and call it when a task is executed successfully.\n         * The registration must be carried out before the task is executed. Otherwise, an exception is thrown.\n         *\n         * @param { CallbackFunction } [callback] - Callback function to register.\n         * @throws { BusinessError } 401 - The input parameters are invalid.\n         * @throws { BusinessError } 10200034 - The executed task does not support the registration of listeners.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        onExecutionSucceeded(callback: CallbackFunction): void;\n        /**\n         * Checks whether the task is complete.\n         *\n         * @returns { boolean } Returns {@code true} if the task has been completed; returns {@code false} otherwise.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        isDone(): boolean;\n        /**\n         * Concurrent function to execute in taskpool.\n         *\n         * @type { Function }\n         * @syscap SystemCapability.Utils.Lang\n         * @since 9\n         */\n        /**\n         * Concurrent function to execute in taskpool.\n         *\n         * @type { Function }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Function to be passed in during task creation. For details about the supported return value types of the function, see Sequenceable Data Types.\n         *\n         * @type { Function }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        function: Function;\n        /**\n         * The concurrent function arguments.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @since 9\n         */\n        /**\n         * The concurrent function arguments.\n         *\n         * @type { ?unknown[] }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Arguments of the function. For details about the supported parameter types, see Sequenceable Data Types.\n         *\n         * @type { ?Object[] }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        arguments?: Object[];\n        /**\n         * Name of the task specified when the task is created.\n         *\n         * @type { string }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        name: string;\n        /**\n         * Task ID.\n         *\n         * @type { number }\n         * @default 0\n         * @syscap SystemCapability.Utils.Lang\n         * @atomicservice\n         * @since 18\n         */\n        taskId: number;\n        /**\n         * Total execution time of the task. in ms.\n         *\n         * @type { number }\n         * @default 0\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        totalDuration: number;\n        /**\n         * Asynchronous I/O time of the task. in ms.\n         *\n         * @type { number }\n         * @default 0\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        ioDuration: number;\n        /**\n         * CPU time of the task. in ms.\n         *\n         * @type { number }\n         * @default 0\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        cpuDuration: number;\n    }\n    /**\n     * The TaskGroup class provides an interface to create a task group.\n     *\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Implements a task group, in which tasks are associated with each other and all tasks are executed at a time.\n     * If all the tasks are executed normally, an array of task results is returned asynchronously, and the sequence of\n     * elements in the array is the same as the sequence of tasks added by calling addTask. If any task fails,\n     * the corresponding exception is thrown. If multiple tasks in the task group fail, the exception of the first failed\n     * task is thrown. A task group can be executed for multiple times, but no task can be added after the task group is executed.\n     * Before calling any APIs in TaskGroup, you must use constructor to create a TaskGroup instance.\n     *\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    class TaskGroup {\n        /**\n         * Create a TaskGroup instance.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Constructor used to create a TaskGroup instance.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        constructor();\n        /**\n         * A constructor used to create a TaskGroup instance, with the task group name specified.\n         *\n         * @param { string } name - Task group name.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * 1.Mandatory parameters are left unspecified;\n         * 2.Incorrect parameter types;\n         * 3.Parameter verification failed.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        constructor(name: string);\n        /**\n         * Add a Concurrent function into task group.\n         *\n         * @param { Function } func - func func Concurrent function to add in task group.\n         * @param { unknown[] } args - args args The concurrent function arguments.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * 1.Mandatory parameters are left unspecified;\n         * 2.Incorrect parameter types;\n         * 3.Parameter verification failed.\n         * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Adds the function to be executed to this task group. Before using this API, you must create a TaskGroup instance.\n         *\n         * @param { Function } func - Function to be executed. The function must be decorated using @Concurrent.\n         *     For details about the supported return value types of the function, see Sequenceable Data Types.\n         * @param { Object[] } args - Arguments of the function. For details about the supported parameter types,\n         *     see Sequenceable Data Types. The default value is undefined.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * 1.Mandatory parameters are left unspecified;\n         * 2.Incorrect parameter types;\n         * 3.Parameter verification failed.\n         * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        addTask(func: Function, ...args: Object[]): void;\n        /**\n         * Add a Task into TaskGroup.\n         *\n         * @param { Task } task - task task The task want to add in task group.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * 1.Mandatory parameters are left unspecified;\n         * 2.Incorrect parameter types;\n         * 3.Parameter verification failed.\n         * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Add a Task into TaskGroup.\n         *\n         * @param { Task } task - task task The task want to add in task group.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * 1.Mandatory parameters are left unspecified;\n         * 2.Incorrect parameter types;\n         * 3.Parameter verification failed.\n         * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Add a Task into TaskGroup.\n         *\n         * @param { Task } task - The task want to add in task group.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n         * @throws { BusinessError } 10200051 - The periodic task cannot be executed again.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        /**\n         * Adds a created task to this task group. Before using this API, you must create a TaskGroup instance.\n         * Tasks in another task group, serial queue, or asynchronous queue, dependent tasks, continuous tasks,\n         * tasks that have been executed, and periodic tasks cannot be added to the task group.\n         *\n         * @param { Task } task - Task to be added to the task group.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types;\n         * <br>3. Parameter verification failed.\n         * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n         * @throws { BusinessError } 10200051 - The periodic task cannot be executed again.\n         * @throws { BusinessError } 10200057 - The task cannot be executed by two APIs.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 18\n         */\n        addTask(task: Task): void;\n        /**\n         * Name of the task group specified when the task group is created.\n         *\n         * @type { string }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        name: string;\n    }\n    /**\n     * Implements a serial queue, in which all tasks are executed in sequence. Before calling any APIs in SequenceRunner,\n     * you must use constructor to create a SequenceRunner instance.\n     *\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    class SequenceRunner {\n        /**\n         * A constructor used to create a SequenceRunner instance.\n         *\n         * @param { Priority } priority - Priority of the task. The default value is taskpool.Priority.MEDIUM.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * 1.Incorrect parameter types;\n         * 2.Parameter verification failed.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        constructor(priority?: Priority);\n        /**\n         * A constructor used to create a SequenceRunner instance. This instance represents a global serial queue.\n         * If the passed-in name is the same as an existing name, the same serial queue is returned.\n         * NOTE:\n         * 1.The bottom layer uses the singleton mode to ensure that the same instance is obtained when a serial queue with the same name is created.\n         * 2.The priority of a serial queue cannot be modified.\n         *\n         * @param { string } name - Name of a serial queue.\n         * @param { Priority } priority - Priority of the task. The default value is taskpool.Priority.MEDIUM.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n         * <br>2. Incorrect parameter types. 3.Parameter verification failed.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        constructor(name: string, priority?: Priority);\n        /**\n         * Execute a concurrent function.\n         *\n         * @param { Task } task - The task want to execute.\n         * @returns { Promise<Object> }\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * 1.Mandatory parameters are left unspecified;\n         * 2.Incorrect parameter types;\n         * @throws { BusinessError } 10200003 - Worker initialization failed.\n         * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n         * @throws { BusinessError } 10200025 - The task to be added to SequenceRunner has dependent tasks.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        /**\n         * Execute a concurrent function.\n         *\n         * @param { Task } task - The task want to execute.\n         * @returns { Promise<Object> }\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types;\n         * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n         * @throws { BusinessError } 10200025 - dependent task not allowed.\n         * @throws { BusinessError } 10200051 - The periodic task cannot be executed again.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        /**\n         * Adds a task to the serial queue for execution. Before using this API, you must create a SequenceRunner instance.\n         * Tasks in another task group, serial queue, or asynchronous queue, dependent tasks, and tasks that have been executed cannot be added to the serial queue.\n         * NOTE:\n         * 1.Tasks that depend others cannot be added to the serial queue.\n         * 2.The failure or cancellation of a task does not affect the execution of subsequent tasks in the serial queue.\n         *\n         * @param { Task } task - Task to be added to the serial queue.\n         * @returns { Promise<Object> }\n         * @throws { BusinessError } 401 - Parameter error. Possible causes:\n         * <br>1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types;\n         * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n         * @throws { BusinessError } 10200025 - dependent task not allowed.\n         * @throws { BusinessError } 10200051 - The periodic task cannot be executed again.\n         * @throws { BusinessError } 10200057 - The task cannot be executed by two APIs.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 18\n         */\n        execute(task: Task): Promise<Object>;\n    }\n    /**\n     * Describes a continuous task. LongTask inherits from Task. No upper limit is set for the execution time of a continuous task,\n     * and no timeout exception is thrown if a continuous task runs for a long period of time. However, a continuous task cannot be\n     * executed in a task group or executed for multiple times. The thread for executing a continuous task exists until terminateTask\n     * is called after the execution is complete. The thread is reclaimed when it is idle.\n     *\n     * @extends Task\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    class LongTask extends Task {\n    }\n    /**\n     * The GenericsTask class provides an interface to create a task with generics.\n     *\n     * @extends Task\n     * @syscap SystemCapability.Utils.Lang\n     * @atomicservice\n     * @since 13\n     */\n    /**\n     * Implements a generic task. GenericsTask inherits from Task. During the creation of a generic task, the passed-in\n     * parameter types and return value types of concurrent functions are verified in the compilation phase.\n     * Other behaviors are the same as those during the creation of a task.\n     *\n     * @extends Task\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 18\n     */\n    class GenericsTask<A extends Array<Object>, R> extends Task {\n        /**\n         * Create a GenericsTask instance.\n         *\n         * @param { (...args: A) => R | Promise<R> } func - Concurrent function to execute in taskpool.\n         * @param { A } args - The concurrent function arguments.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed.\n         * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n         * @syscap SystemCapability.Utils.Lang\n         * @atomicservice\n         * @since 13\n         */\n        /**\n         * A constructor used to create a GenericsTask object.\n         *\n         * @param { (...args: A) => R | Promise<R> } func - Function to be executed. The function must be decorated using @Concurrent.\n         *     For details about the supported return value types of the function, see Sequenceable Data Types.\n         * @param { A } args - Arguments of the function. For details about the supported parameter types, see Sequenceable Data Types.\n         *     The default value is undefined.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed.\n         * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 18\n         */\n        constructor(func: (...args: A) => R | Promise<R>, ...args: A);\n        /**\n         * Create a GenericsTask instance.\n         *\n         * @param { string } name - The name of GenericsTask.\n         * @param { (...args: A) => R | Promise<R> } func - Concurrent function to execute in taskpool.\n         * @param { A } args - The concurrent function arguments.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed.\n         * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n         * @syscap SystemCapability.Utils.Lang\n         * @atomicservice\n         * @since 13\n         */\n        /**\n         * A constructor used to create a GenericsTask instance, with the task name specified.\n         *\n         * @param { string } name - Name of the generic task.\n         * @param { (...args: A) => R | Promise<R> } func - Function to be executed. The function must be decorated using @Concurrent.\n         *     For details about the supported return value types of the function, see Sequenceable Data Types.\n         * @param { A } args - Arguments of the function. For details about the supported parameter types, see Sequenceable Data Types.\n         *     The default value is undefined.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed.\n         * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 18\n         */\n        constructor(name: string, func: (...args: A) => R | Promise<R>, ...args: A);\n    }\n    /**\n     * The State defines the task state.\n     *\n     * @enum { number } State\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Enumerates the task states. After a task is created and execute() is called, the task is placed in the internal\n     * queue of the task pool and the state is WAITING. When the task is being executed by the worker thread of the task pool,\n     * the state changes to RUNNING. After the task is executed and the result is returned, the state is reset to WAITING.\n     * When the task is proactively canceled, the state changes to CANCELED.\n     *\n     * @enum { number } State\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    enum State {\n        /**\n         * the task state is waiting.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * The task is waiting.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        WAITING = 1,\n        /**\n         * the task state is running.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * The task is running.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        RUNNING = 2,\n        /**\n         * the task state is canceled.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * The task is canceled.\n         *\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        CANCELED = 3\n    }\n    /**\n     * Indicates the internal information of the worker thread.\n     *\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Describes the internal information about a task.\n     *\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    class TaskInfo {\n        /**\n         * Task identity.\n         *\n         * @type { number }\n         * @default 0\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Task ID.\n         *\n         * @type { number }\n         * @default 0\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        taskId: number;\n        /**\n         * Task state.\n         *\n         * @type { State }\n         * @default State::WAITING\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Task state.\n         *\n         * @type { State }\n         * @default State::WAITING\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        state: State;\n        /**\n         * Duration of task execution.\n         *\n         * @type { ?number }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Duration that the task has been executed, in ms. If the return value is 0, the task is not running. If the return value is empty, no task is running.\n         *\n         * @type { ?number }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        duration?: number;\n        /**\n         * Task name.\n         *\n         * @type { string }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 12\n         */\n        name: string;\n    }\n    /**\n     * Indicates the internal information of the worker thread.\n     *\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Describes the internal information about a worker thread.\n     *\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    class ThreadInfo {\n        /**\n         * Thread id.\n         *\n         * @type { number }\n         * @default 0\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * ID of the worker thread. If the return value is empty, no task is running.\n         *\n         * @type { number }\n         * @default 0\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        tid: number;\n        /**\n         * Task id list that running on current thread.\n         *\n         * @type { ?number[] }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * IDs of tasks running on the calling thread. If the return value is empty, no task is running.\n         *\n         * @type { ?number[] }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        taskIds?: number[];\n        /**\n         * Thread priority.\n         *\n         * @type { ?Priority }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Priority of the calling thread. If the return value is empty, no task is running.\n         *\n         * @type { ?Priority }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        priority?: Priority;\n    }\n    /**\n     * Indicates the internal information of the taskpool.\n     *\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Describes the internal information about a task pool.\n     *\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    class TaskPoolInfo {\n        /**\n         * An array of taskpool thread information.\n         *\n         * @type { ThreadInfo[] }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Internal information about the worker threads.\n         *\n         * @type { ThreadInfo[] }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        threadInfos: ThreadInfo[];\n        /**\n         * An array of taskpool task information.\n         *\n         * @type { TaskInfo[] }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @since 10\n         */\n        /**\n         * Internal information about the tasks.\n         *\n         * @type { TaskInfo[] }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 11\n         */\n        taskInfos: TaskInfo[];\n    }\n    /**\n     * Execute a concurrent function.\n     *\n     * @param { Function } func - func func Concurrent function want to execute.\n     * @param { unknown[] } args - args args The concurrent function arguments.\n     * @returns { Promise<unknown> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * 1.Mandatory parameters are left unspecified;\n     * 2.Incorrect parameter types;\n     * 3.Parameter verification failed.\n     * @throws { BusinessError } 10200003 - Worker initialization failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @syscap SystemCapability.Utils.Lang\n     * @since 9\n     */\n    /**\n     * Execute a concurrent function.\n     *\n     * @param { Function } func - func func Concurrent function want to execute.\n     * @param { unknown[] } args - args args The concurrent function arguments.\n     * @returns { Promise<unknown> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * 1.Mandatory parameters are left unspecified;\n     * 2.Incorrect parameter types;\n     * 3.Parameter verification failed.\n     * @throws { BusinessError } 10200003 - Worker initialization failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Execute a concurrent function.\n     *\n     * @param { Function } func - func func Concurrent function want to execute.\n     * @param { Object[] } args - args args The concurrent function arguments.\n     * @returns { Promise<Object> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * 1.Mandatory parameters are left unspecified;\n     * 2.Incorrect parameter types;\n     * 3.Parameter verification failed.\n     * @throws { BusinessError } 10200003 - Worker initialization failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Places a function to be executed in the internal queue of the task pool. The function is not executed immediately.\n     * It waits to be distributed to the worker thread for execution. In this mode, the function cannot be canceled.\n     *\n     * @param { Function } func - Function to be executed. The function must be decorated using @Concurrent.\n     *     For details about the supported return value types of the function, see Sequenceable Data Types.\n     * @param { Object[] } args - Arguments of the function. For details about the supported parameter types,\n     *     see Sequenceable Data Types. The default value is undefined.\n     * @returns { Promise<Object> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * 1.Mandatory parameters are left unspecified;\n     * 2.Incorrect parameter types;\n     * 3.Parameter verification failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    function execute(func: Function, ...args: Object[]): Promise<Object>;\n    /**\n     * Execute a concurrent function with generics.\n     *\n     * @param { (...args: A) => R | Promise<R> } func - Concurrent function want to execute.\n     * @param { A } args - The concurrent function arguments.\n     * @returns { Promise<R> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @syscap SystemCapability.Utils.Lang\n     * @atomicservice\n     * @since 13\n     */\n    /**\n     * Verifies the passed-in parameter types and return value type of a concurrent function,\n     * and places the function to execute in the internal queue of the task pool.\n     *\n     * @param { (...args: A) => R | Promise<R> } func - Function to be executed. The function must be decorated using @Concurrent.\n     *     For details about the supported return value types of the function, see Sequenceable Data Types.\n     * @param { A } args - Arguments of the function. For details about the supported parameter types,\n     *     see Sequenceable Data Types. The default value is undefined.\n     * @returns { Promise<R> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 18\n     */\n    function execute<A extends Array<Object>, R>(func: (...args: A) => R | Promise<R>, ...args: A): Promise<R>;\n    /**\n     * Execute a concurrent task.\n     *\n     * @param { Task } task - task task The task want to execute.\n     * @param { Priority } [priority] - priority priority Task priority, MEDIUM is default.\n     * @returns { Promise<unknown> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * 1.Mandatory parameters are left unspecified;\n     * 2.Incorrect parameter types;\n     * 3.Parameter verification failed.\n     * @throws { BusinessError } 10200003 - Worker initialization failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @syscap SystemCapability.Utils.Lang\n     * @since 9\n     */\n    /**\n     * Execute a concurrent task.\n     *\n     * @param { Task } task - task task The task want to execute.\n     * @param { Priority } [priority] - priority priority Task priority, MEDIUM is default.\n     * @returns { Promise<unknown> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * 1.Mandatory parameters are left unspecified;\n     * 2.Incorrect parameter types;\n     * 3.Parameter verification failed.\n     * @throws { BusinessError } 10200003 - Worker initialization failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Execute a concurrent task.\n     *\n     * @param { Task } task - task task The task want to execute.\n     * @param { Priority } [priority] - priority priority Task priority, MEDIUM is default.\n     * @returns { Promise<Object> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * 1.Mandatory parameters are left unspecified;\n     * 2.Incorrect parameter types;\n     * 3.Parameter verification failed.\n     * @throws { BusinessError } 10200003 - Worker initialization failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Execute a concurrent task.\n     *\n     * @param { Task } task - The task want to execute.\n     * @param { Priority } [priority] - Task priority, MEDIUM is default.\n     * @returns { Promise<Object> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified;\n     * <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @throws { BusinessError } 10200051 - The periodic task cannot be executed again.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    /**\n     * Places a task in the internal queue of the task pool. The task is not executed immediately. It waits to be distributed\n     * to the worker thread for execution. In this mode, you can set the task priority and call cancel() to cancel the task.\n     * The task cannot be a task in a task group, serial queue, or asynchronous queue. This API can be called only once for\n     * a continuous task, but multiple times for a non-continuous task.\n     *\n     * @param { Task } task - Task to be executed.\n     * @param { Priority } [priority] - Priority of the task. The default value is taskpool.Priority.MEDIUM.\n     * @returns { Promise<Object> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified;\n     * <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @throws { BusinessError } 10200051 - The periodic task cannot be executed again.\n     * @throws { BusinessError } 10200057 - The task cannot be executed by two APIs.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 18\n     */\n    function execute(task: Task, priority?: Priority): Promise<Object>;\n    /**\n     * Execute a concurrent task with generics.\n     *\n     * @param { GenericsTask<A, R> } task - The task want to execute.\n     * @param { Priority } [priority] - Task priority, MEDIUM is default.\n     * @returns { Promise<R> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @throws { BusinessError } 10200051 - The periodic task cannot be executed again.\n     * @syscap SystemCapability.Utils.Lang\n     * @atomicservice\n     * @since 13\n     */\n    /**\n     * Verifies the passed-in parameter types and return value type of a concurrent function, and places the generic task in the internal queue of the task pool.\n     *\n     * @param { GenericsTask<A, R> } task - Generic task to be executed.\n     * @param { Priority } [priority] - Priority of the task. The default value is taskpool.Priority.MEDIUM.\n     * @returns { Promise<R> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @throws { BusinessError } 10200051 - The periodic task cannot be executed again.\n     * @throws { BusinessError } 10200057 - The task cannot be executed by two APIs.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 18\n     */\n    function execute<A extends Array<Object>, R>(task: GenericsTask<A, R>, priority?: Priority): Promise<R>;\n    /**\n     * Execute a concurrent task group.\n     *\n     * @param { TaskGroup } group - group group The task group want to execute.\n     * @param { Priority } [priority] - priority priority Task group priority, MEDIUM is default.\n     * @returns { Promise<unknown[]> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * 1.Mandatory parameters are left unspecified;\n     * 2.Incorrect parameter types;\n     * 3.Parameter verification failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Places a task group in the internal queue of the task pool. The tasks in the task group are not executed immediately.\n     * They wait to be distributed to the worker thread for execution. After all tasks in the task group are executed,\n     * a result array is returned. This API applies when you want to execute a group of associated tasks.\n     *\n     * @param { TaskGroup } group - Task group to be executed.\n     * @param { Priority } [priority] - Priority of the task group. The default value is taskpool.Priority.MEDIUM.\n     * @returns { Promise<Object[]> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * 1.Mandatory parameters are left unspecified;\n     * 2.Incorrect parameter types;\n     * 3.Parameter verification failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function execute(group: TaskGroup, priority?: Priority): Promise<Object[]>;\n    /**\n     * Execute a concurrent task after the specified time.\n     *\n     * @param { number } delayTime - delayTime delayTime The time want to delay.\n     * @param { Task } task - task task The task want to execute.\n     * @param { Priority } [priority] - priority priority Task priority, MEDIUM is default.\n     * @returns { Promise<Object> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * 1.Mandatory parameters are left unspecified;\n     * 2.Incorrect parameter types;\n     * 3.Parameter verification failed.\n     * @throws { BusinessError } 10200028 - The delayTime is less than zero.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Execute a concurrent task after the specified time.\n     *\n     * @param { number } delayTime - The time want to delay.\n     * @param { Task } task - The task want to execute.\n     * @param { Priority } [priority] - Task priority, MEDIUM is default.\n     * @returns { Promise<Object> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified;\n     * <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @throws { BusinessError } 10200028 - The delayTime is less than zero.\n     * @throws { BusinessError } 10200051 - The periodic task cannot be executed again.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    /**\n     * Executes a task after a given delay. In this mode, you can set the task priority and call cancel() to cancel the task.\n     * The task cannot be a task in a task group, serial queue, or asynchronous queue, or a periodic task.\n     * This API can be called only once for a continuous task, but multiple times for a non-continuous task.\n     *\n     * @param { number } delayTime - Delay, in ms.\n     * @param { Task } task - Task to be executed with a delay.\n     * @param { Priority } [priority] - Priority of the task. The default value is taskpool.Priority.MEDIUM.\n     * @returns { Promise<Object> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified;\n     * <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @throws { BusinessError } 10200028 - The delayTime is less than zero.\n     * @throws { BusinessError } 10200051 - The periodic task cannot be executed again.\n     * @throws { BusinessError } 10200057 - The task cannot be executed by two APIs.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 18\n     */\n    function executeDelayed(delayTime: number, task: Task, priority?: Priority): Promise<Object>;\n    /**\n     * Execute a concurrent task with generics after the specified time.\n     *\n     * @param { number } delayTime - The time want to delay.\n     * @param { GenericsTask<A, R> } task - The task want to execute.\n     * @param { Priority } [priority] - Task priority, MEDIUM is default.\n     * @returns { Promise<R> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed.\n     * @throws { BusinessError } 10200028 - The delayTime is less than zero.\n     * @throws { BusinessError } 10200051 - The periodic task cannot be executed again.\n     * @syscap SystemCapability.Utils.Lang\n     * @atomicservice\n     * @since 13\n     */\n    /**\n     * Verifies the passed-in parameter types and return value type of a concurrent function, and executes the generic task with a delay.\n     *\n     * @param { number } delayTime - Delay, in ms.\n     * @param { GenericsTask<A, R> } task - Generic task to be executed with a delay.\n     * @param { Priority } [priority] - Priority of the task. The default value is taskpool.Priority.MEDIUM.\n     * @returns { Promise<R> }\n     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed.\n     * @throws { BusinessError } 10200028 - The delayTime is less than zero.\n     * @throws { BusinessError } 10200051 - The periodic task cannot be executed again.\n     * @throws { BusinessError } 10200057 - The task cannot be executed by two APIs.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 18\n     */\n    function executeDelayed<A extends Array<Object>, R>(delayTime: number, task: GenericsTask<A, R>, priority?: Priority): Promise<R>;\n    /**\n     * Execute a concurrent task periodically.\n     *\n     * @param { number } period - The period in milliseconds for executing task.\n     * @param { Task } task - The task want to execute.\n     * @param { Priority } [priority] - Task priority, MEDIUM is default.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified;\n     * <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @throws { BusinessError } 10200028 - The period is less than zero.\n     * @throws { BusinessError } 10200050 - The concurrent task has been executed and cannot be executed periodically.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    /**\n     * Executes a task periodically. In this execution mode, you can set the task priority and call cancel() to cancel the execution.\n     * A periodic task cannot be a task in a task group, serial queue, or asynchronous queue. It cannot call execute() again or have a dependency relationship.\n     *\n     * @param { number } period - Execution period, in ms.\n     * @param { Task } task - Task to be executed.\n     * @param { Priority } [priority] - Priority of the task. The default value is taskpool.Priority.MEDIUM.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * <br>1. Mandatory parameters are left unspecified;\n     * <br>2. Incorrect parameter types;\n     * <br>3. Parameter verification failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @throws { BusinessError } 10200028 - The period is less than zero.\n     * @throws { BusinessError } 10200050 - The concurrent task has been executed and cannot be executed periodically.\n     * @throws { BusinessError } 10200057 - The task cannot be executed by two APIs.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 18\n     */\n    function executePeriodically(period: number, task: Task, priority?: Priority): void;\n    /**\n     * Execute a concurrent task with generics periodically.\n     *\n     * @param { number } period - The period in milliseconds for executing task.\n     * @param { GenericsTask<A, R> } task - The task want to execute.\n     * @param { Priority } [priority] - Task priority, MEDIUM is default.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @throws { BusinessError } 10200028 - The period is less than zero.\n     * @throws { BusinessError } 10200050 - The concurrent task has been executed and cannot be executed periodically.\n     * @syscap SystemCapability.Utils.Lang\n     * @atomicservice\n     * @since 13\n     */\n    /**\n     * Verifies the passed-in parameter types and return value type of a concurrent function, and executes the generic task\n     * periodically at an interval specified by period.\n     *\n     * @param { number } period - Execution period, in ms.\n     * @param { GenericsTask<A, R> } task - Generic task to be executed periodically.\n     * @param { Priority } [priority] - Priority of the task. The default value is taskpool.Priority.MEDIUM.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed.\n     * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n     * @throws { BusinessError } 10200014 - The function is not marked as concurrent.\n     * @throws { BusinessError } 10200028 - The period is less than zero.\n     * @throws { BusinessError } 10200050 - The concurrent task has been executed and cannot be executed periodically.\n     * @throws { BusinessError } 10200057 - The task cannot be executed by two APIs.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 18\n     */\n    function executePeriodically<A extends Array<Object>, R>(period: number, task: GenericsTask<A, R>, priority?: Priority): void;\n    /**\n     * Cancel a concurrent task.\n     *\n     * @param { Task } task - task task The task want to cancel.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * 1.Mandatory parameters are left unspecified;\n     * 2.Incorrect parameter types;\n     * 3.Parameter verification failed.\n     * @throws { BusinessError } 10200015 - The task to cancel does not exist.\n     * @throws { BusinessError } 10200016 - The task to cancel is being executed.\n     * @syscap SystemCapability.Utils.Lang\n     * @since 9\n     */\n    /**\n     * Cancel a concurrent task.\n     *\n     * @param { Task } task - task task The task want to cancel.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * 1.Mandatory parameters are left unspecified;\n     * 2.Incorrect parameter types;\n     * 3.Parameter verification failed.\n     * @throws { BusinessError } 10200015 - The task to cancel does not exist.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Cancel a concurrent task.\n     *\n     * @param { Task } task - task task The task want to cancel.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * 1.Mandatory parameters are left unspecified;\n     * 2.Incorrect parameter types;\n     * 3.Parameter verification failed.\n     * @throws { BusinessError } 10200015 - The task to cancel does not exist.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Cancels a task in the task pool. If the task is in the internal queue of the task pool, the task will not be executed\n     * after being canceled, and an exception indicating task cancellation is returned. If the task has been distributed to\n     * the worker thread of the task pool, canceling the task does not affect the task execution, and the execution result\n     * is returned in the catch branch. You can use isCanceled() to check the task cancellation status. In other words,\n     * taskpool.cancel takes effect before taskpool.execute or taskpool.executeDelayed is called.\n     *\n     * @param { Task } task - Task to cancel.\n     * @throws { BusinessError } 10200015 - The task to cancel does not exist.\n     * @throws { BusinessError } 10200055 - The asyncRunner task has been canceled.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 18\n     */\n    function cancel(task: Task): void;\n    /**\n     * Cancel a concurrent task group.\n     *\n     * @param { TaskGroup } group - group group The task group want to cancel.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * 1.Mandatory parameters are left unspecified;\n     * 2.Incorrect parameter types;\n     * 3.Parameter verification failed.\n     * @throws { BusinessError } 10200018 - The task group to cancel does not exist.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Cancels a task group in the task pool. If a task group is canceled before all the tasks in it are finished, undefined is returned.\n     *\n     * @param { TaskGroup } group - Task group to cancel.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * 1.Mandatory parameters are left unspecified;\n     * 2.Incorrect parameter types;\n     * 3.Parameter verification failed.\n     * @throws { BusinessError } 10200018 - The task group to cancel does not exist.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function cancel(group: TaskGroup): void;\n    /**\n     * Cancels a task in the task pool by task ID. If the task is in the internal queue of the task pool,\n     * the task will not be executed after being canceled, and an exception indicating task cancellation is returned.\n     * If the task has been distributed to the worker thread of the task pool, canceling the task does not affect the task execution,\n     * and the execution result is returned in the catch branch. You can use isCanceled() to check the task cancellation status.\n     * In other words, taskpool.cancel takes effect before taskpool.execute or taskpool.executeDelayed is called.\n     * If taskpool.cancel is called by other threads, note that the cancel operation, which is asynchronous,\n     * may take effect for later calls of taskpool.execute or taskpool.executeDelayed.\n     *\n     * @param { number } taskId - ID of the task to cancel.\n     * @throws { BusinessError } 10200015 - The task to cancel does not exist.\n     * @throws { BusinessError } 10200055 - The asyncRunner task has been canceled.\n     * @syscap SystemCapability.Utils.Lang\n     * @atomicservice\n     * @since 18\n     */\n    function cancel(taskId: number): void;\n    /**\n     * Get task pool internal information.\n     *\n     * @returns { TaskPoolInfo }\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @since 10\n     */\n    /**\n     * Obtains internal information about this task pool, including thread information and task information.\n     *\n     * @returns { TaskPoolInfo }\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 11\n     */\n    function getTaskPoolInfo(): TaskPoolInfo;\n    /**\n     * Terminates a continuous task in the task pool. It is called after the continuous task is complete.\n     * After the task is terminated, the thread that executes the task may be reclaimed.\n     *\n     * @param { LongTask } longTask - Continuous task to terminate.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * 1.Mandatory parameters are left unspecified;\n     * 2.Incorrect parameter types;\n     * 3.Parameter verification failed.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    function terminateTask(longTask: LongTask): void;\n    /**\n     * Checks whether a function is a concurrent function.\n     *\n     * @param { Function } func - Function to check.\n     * @returns { boolean } Returns {@code true} if it is a concurrent function; returns {@code false} otherwise.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     * 1.Mandatory parameters are left unspecified;\n     * 2.Incorrect parameter types;\n     * 3.Parameter verification failed.\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 12\n     */\n    function isConcurrent(func: Function): boolean;\n    /**\n     * Implements an asynchronous queue, for which you can specify the task execution concurrency and queuing policy.\n     * Before calling any APIs in AsyncRunner, you must use constructor to create an AsyncRunner instance.\n     *\n     * @syscap SystemCapability.Utils.Lang\n     * @atomicservice\n     * @since 18\n     */\n    export class AsyncRunner {\n        /**\n         * A constructor used to create an AsyncRunner instance. It constructs a non-global asynchronous queue.\n         * Even when the parameters passed are the same, it returns different asynchronous queues.\n         *\n         * @param { number } runningCapacity - Maximum number of tasks that can run concurrently. The value must be a positive integer.\n         *     If a negative number is passed, an error is reported. If a non-integer is passed, the value is rounded down.\n         * @param { ?number } waitingCapacity - Maximum number of tasks that can be queued. The value must be greater than or equal to 0.\n         *     If a negative number is passed, an error is reported. If a non-integer is passed, the value is rounded down.\n         *     The default value is 0, indicating that there is no limit to the number of tasks that can wait.\n         *     If a value greater than 0 is passed, tasks will be discarded from the front of the queue once the queue size\n         *     exceeds this limit, implementing a discard policy.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n         * <br>2. Incorrect parameter types. 3.Parameter verification failed.\n         * @syscap SystemCapability.Utils.Lang\n         * @atomicservice\n         * @since 18\n         */\n        constructor(runningCapacity: number, waitingCapacity?: number);\n        /**\n         * A constructor used to create an AsyncRunner instance. It constructs a global asynchronous queue.\n         * If the passed-in name is the same as an existing name, the same asynchronous queue is returned.\n         * NOTE:\n         * 1.The bottom layer uses the singleton mode to ensure that the same instance is obtained when an asynchronous queue with the same name is created.\n         * 2.The task execution concurrency and waiting capacity cannot be modified.\n         *\n         * @param { string } name - Name of an asynchronous queue.\n         * @param { number } runningCapacity - Maximum number of tasks that can run concurrently. The value must be a positive integer.\n         *     If a negative number is passed, an error is reported. If a non-integer is passed, the value is rounded down.\n         * @param { ?number } waitingCapacity - Maximum number of tasks that can be queued. The value must be greater than or equal to 0.\n         *     If a negative number is passed, an error is reported. If a non-integer is passed, the value is rounded down.\n         *     The default value is 0, indicating that there is no limit to the number of tasks that can wait.\n         *     If a value greater than 0 is passed, tasks will be discarded from the front of the queue once the queue size\n         *     exceeds this limit, implementing a discard policy.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.\n         * <br>2. Incorrect parameter types. 3.Parameter verification failed.\n         * @syscap SystemCapability.Utils.Lang\n         * @atomicservice\n         * @since 18\n         */\n        constructor(name: string, runningCapacity: number, waitingCapacity?: number);\n        /**\n         * Adds a task to the asynchronous queue for execution. Before using this API, you must create an AsyncRunner instance.\n         * NOTE:\n         * Tasks in a task group cannot be added to the asynchronous queue.\n         * Tasks in a serial queue cannot be added to the asynchronous queue.\n         * Tasks in other asynchronous queues cannot be added to the asynchronous queue.\n         * Periodic tasks cannot be added to the asynchronous queue.\n         * Delayed tasks cannot be added to the asynchronous queue.\n         * Tasks that depend others cannot be added to the asynchronous queue.\n         * Tasks that have been executed cannot be added to the asynchronous queue.\n         *\n         * @param { Task } task - Task to be added to the asynchronous queue.\n         * @param { ?Priority } priority - Priority of the task. The default value is taskpool.Priority.MEDIUM.\n         * @returns { Promise<Object> }\n         * @throws { BusinessError } 10200006 - An exception occurred during serialization.\n         * @throws { BusinessError } 10200025 - dependent task not allowed.\n         * @throws { BusinessError } 10200051 - The periodic task cannot be executed again.\n         * @throws { BusinessError } 10200054 - The asyncRunner task is discarded.\n         * @throws { BusinessError } 10200057 - The task cannot be executed by two APIs.\n         * @syscap SystemCapability.Utils.Lang\n         * @atomicservice\n         * @since 18\n         */\n        execute(task: Task, priority?: Priority): Promise<Object>;\n    }\n    /**\n     * Defines the task result interface\n     *\n     * @interface TaskResult\n     * @syscap SystemCapability.Utils.Lang\n     * @crossplatform\n     * @atomicservice\n     * @since 20\n     */\n    interface TaskResult {\n        /**\n         * the result returned by the task\n         *\n         * @type { ?Object }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 20\n         */\n        result?: Object;\n        /**\n         * the error thrown by the task\n         *\n         * @type { ?(Error | Object) }\n         * @syscap SystemCapability.Utils.Lang\n         * @crossplatform\n         * @atomicservice\n         * @since 20\n         */\n        error?: Error | Object;\n    }\n}\nexport default taskpool;\n",
}
export default FILE;